
  <tr class="title">
    <th rowspan=2>部位</th>
    <th rowspan=2>損傷形状</th>
    <th rowspan=2>損傷範囲</th>
    <th rowspan=2>損傷程度</th>
    <th rowspan=2>作業開始工程</th>
	<th colspan=6 align="center">鈑金工程</th>
	<th colspan=2 align="center">下地工程</th>
	<th align="center">塗装工程</th>
	<th colspan=3 align="center">仕上げ工程</th>
	<th rowspan=2 colspan=2>操作</th>
  </tr>
  <tr class="title">
  	<th>着工分解</th>
    <th>カット</th>
    <th>修正機セット</th>
    <th>フレーム修正</th>
    <th>凹み修正</th>
    <th>鈑金パテ</th>
    <th>塗装パテ</th>
    <th>サフ</th>
    <th>塗装</th>
    <th>組付</th>
    <th>組換</th>
    <th>磨き</th>
  </tr>
  <% order_items.each do |order_item|%>
  <% style = cycle('list-line-odd','list-line-even')%>
  <!--给每一行加上该order_item的id，以便在删除时使用-->
  	<tr valign="top" class="<%= style%>" id="order_item_<%=order_item.id%>">
  		<td><%= order_item.position ? order_item.position.part: order_item.inside_position.part%></td>
		<td><%= order_item.damage_shape%></td>
		<td><%= order_item.area_x.to_s + "CM" + "×" + order_item.area_y.to_s + "CM"%></td>
		<td><%= order_item.damage_degree%></td>
		<td><%= order_item.work_judge%></td>
		<td><%= (order_item.uninstall_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.cut_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.frame_amend_set_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.frame_amend_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.metal_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.metal_putty_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.putty_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.surface_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.paint_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.assemble * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.recombine * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order_item.polish * Order::TIME_UNIT).round.to_i%></td>
		<td width=35 align=center><%= link_to "編集",{:controller => :admin, :action => :edit_order_item, :id => order_item}, :method => :post%></td>
		<td width=35 align=center><%= link_to_remote "削除",:url => {:controller => :admin, :action => :destroy_order_item, :id => order_item}, :confirm => "削除しますか", :method => :delete%></td>
	</tr>
  <%end%>
   <tr bgcolor=#ff8080  id="total_time">
  								
		<td colspan=5 align="center">合計時間</td>
		<td><%= (order.sum_uninstall_index * Order::TIME_UNIT * time_index_of_uninstall).round.to_i%></td>
		<td><%= (order.sum_cut_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order.sum_frame_amend_set_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order.sum_frame_amend_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order.sum_metal_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order.sum_metal_putty_index * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order.sum_putty_index * Order::TIME_UNIT * time_index_of_putty).round.to_i%></td>
		<td><%= (order.sum_surface_index * Order::TIME_UNIT * time_index_of_surface).round.to_i%></td>
		<td><%= (order.sum_paint_index * Order::TIME_UNIT * time_index_of_paint).round.to_i%></td>
		<td><%= (order.sum_assemble * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order.sum_recombine * Order::TIME_UNIT).round.to_i%></td>
		<td><%= (order.sum_polish * Order::TIME_UNIT).round.to_i%></td>
		<td colspan=2></td>
		
  </tr>



